package learm.pers.studyswagger.swagger.controller;

import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UserController
 * @Description:
 * @Author: fangqing
 * @Date: 2021/8/5
 */
@RestController
@RequestMapping("/user")
@Api(tags = "1.0", description = "用户管理", value = "用户管理")
public class UserController {

    @GetMapping("/hello")
    @ApiOperation("展示欢迎信息")
    public String hello(@ApiParam("名字") String name) {
        return "hello, " + name;
    }


    @GetMapping("/getUser")
    @ApiOperation(value = "获取用户详情")
    public Object getUserDetail(@ApiParam(value = "用户id",required = true) @RequestParam String id) {
        return "hello, " + id;
    }
}
